From: Marco Trevisan (TreviƱo) Date: Wed, 15 Aug 2018 01:33:13 +0000 (+0200) Subject: js/main: Throw error if no valid default stylesheet is found X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~929^2^2~55 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=30cb2127a14bf291cd15e92111022d636d3c9a1f;p=gnome-shell.git js/main: Throw error if no valid default stylesheet is found Throw an error using an informative message in case a mode uses a stylesheet that can't be loaded, instead of crashing later because the theming can't be properly computed, and thus the minimum size of the actors. --- diff --git a/js/ui/main.js b/js/ui/main.js index e107de744..9e7ce8706 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -343,6 +343,9 @@ function loadTheme() { let theme = new St.Theme ({ application_stylesheet: _cssStylesheet, default_stylesheet: _defaultCssStylesheet }); + if (theme.default_stylesheet == null) + throw new Error("No valid stylesheet found for '%s'".format(sessionMode.stylesheetName)); + if (previousTheme) { let customStylesheets = previousTheme.get_custom_stylesheets();